#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;

int main(){
	int n;
	cin>>n;
	if(n>=401){
		printf("%.1lf",150*0.4463+250*0.4663+(n-400)*0.5663);
	}else if(n>150){
		printf("%.1lf",150*0.4463+(n-150)*0.4663);		
	}else{
		printf("%.1lf",n*0.4463);			
	}
	return 0;
}
